Function Reference


_GUIToolTip_DelTool

Deletes a tool from a tooltip control

 #include <GuiToolTip.au3>
_GUIToolTip_DelTool ( $hWnd, $hTool [, $iID = 0] )

Parameters

$hWnd Handle to the ToolTip control (returned by _GUIToolTip_Create.)
$hTool Handle to the window that contains the tool (see Remarks)
$iID [optional] Handle of the tool to delete (see Remarks)

Return Value

None.

Remarks

Use the same parameters for $hTool and $iID that were used to create the tool using _GUIToolTip_AddTool

Related

_GUIToolTip_AddTool

Example

#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>

Example()

Func Example()
    Local $msg
    Local $hGUI = GUICreate(StringTrimRight(@ScriptName, 4), 350, 200)

    Local $iButton = GUICtrlCreateButton("This is a button", 30, 32, 130, 28)
    Local $hButton = GUICtrlGetHandle($iButton)
    ; create a tooltip control using default settings
    Local $hToolTip = _GUIToolTip_Create(0)
    _GUIToolTip_SetMaxTipWidth($hToolTip, 400)
    ; add a tool to the tooltip control
    _GUIToolTip_AddTool($hToolTip, 0, "Click this to delete the tooltip" & @CRLF & "for this button", $hButton)
    GUISetState()

    While 1
        $msg = GUIGetMsg()
        Switch $msg
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $iButton
                ; Deletes the tooltip assigned to the button, but not the tooltip control
                _GUIToolTip_DelTool($hToolTip, 0, $hButton)
        EndSwitch
    WEnd
    ; Destroy the tooltip control
    _GUIToolTip_Destroy($hToolTip)
    GUIDelete($hGUI)
EndFunc   ;==>Example